package net.lz1998.pbbot.plugin;

import lombok.extern.slf4j.Slf4j;
import net.lz1998.pbbot.bot.Bot;
import net.lz1998.pbbot.bot.BotPlugin;
import net.lz1998.pbbot.constant.BannedConstant;
import net.lz1998.pbbot.constant.TitleConstant;
import net.lz1998.pbbot.utils.Msg;
import onebot.OnebotEvent;
import org.jetbrains.annotations.NotNull;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class DemoPlugin extends BotPlugin {

    @Override
    public int onPrivateMessage(@NotNull Bot bot, @NotNull OnebotEvent.PrivateMessageEvent event) {
       /* long userId = event.getUserId();
        Msg msg = Msg.builder()
                .face(1)
                .text("hello1")
                .text("hello2")
                .image("https://www.baidu.com/img/flexible/logo/pc/result@2.png");
        bot.sendPrivateMsg(userId, msg, false);*/
        return MESSAGE_IGNORE;
    }

    @Override
    public int onGroupMessage(@NotNull Bot bot, @NotNull OnebotEvent.GroupMessageEvent event) {
       /* long userId = event.getUserId();
        long groupId = event.getGroupId();
        int messageId = event.getMessageId();
        String msg = event.getRawMessage().trim();
        String rawMessage = bot.getMsg(messageId).getRawMessage();
        log.info("收到消息:{}",msg);
        if(msg.equals("测试")&&groupId == 694423212) {
            bot.sendGroupMsg(groupId, "机器人测试", true);
        }*/
        return MESSAGE_IGNORE;
    }
}
